package com.yanxml.spring.history.v3.demo2_import;

import com.yanxml.spring.history.v3.demo2_import.config.JavaConfig;
import com.yanxml.spring.history.v3.demo2_import.service.OrderService;
import com.yanxml.spring.history.v3.demo2_import.service.StudentService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class StartAppDemo2 {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(JavaConfig.class);
        System.out.println(applicationContext.getBean(StudentService.class));
        System.out.println(applicationContext.getBean(OrderService.class));
    }
}

// demo1_2:
//com.yanxml.spring.history.v3.demo2_import.service.StudentService@25a65b77
//com.yanxml.spring.history.v3.demo2_import.service.OrderService@2ed0fbae